package com.lantosec.hmrp.modules.category.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.category.entity.AssetsInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 资产信息表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="AssetsInfo对象", description="资产信息表")
public class AssetsInfoVO extends BaseVO<AssetsInfo> {
    private static final long serialVersionUID = 1L;


    public AssetsInfoVO(AssetsInfo entity){
        this.assetsId = entity.getAssetsId();
        this.assetsCode = entity.getAssetsCode();
        this.dirId = entity.getDirId();
        this.assetsName = entity.getAssetsName();
        this.categoryId = entity.getCategoryId();
        this.lableType = entity.getLableType();
        this.assetsState = entity.getAssetsState();
        this.brand = entity.getBrand();
        this.specification = entity.getSpecification();
        this.unit = entity.getUnit();
        this.buyDate = entity.getBuyDate();
        this.serviceLife = entity.getServiceLife();
        this.expireDate = entity.getExpireDate();
        this.price = entity.getPrice();
        this.nowPrice = entity.getNowPrice();
        this.supplierCode = entity.getSupplierCode();
        this.supplier = entity.getSupplier();
        this.factoryCode = entity.getFactoryCode();
        this.factory = entity.getFactory();
        this.useDeptId = entity.getUseDeptId();
        this.useDept = entity.getUseDept();
        this.useUserId = entity.getUseUserId();
        this.useUser = entity.getUseUser();
        this.areaId = entity.getAreaId();
        this.areaName = entity.getAreaName();
        this.belongDeptId = entity.getBelongDeptId();
        this.belognDept = entity.getBelognDept();
        this.manageUserId = entity.getManageUserId();
        this.manageUser = entity.getManageUser();
        this.storageLocation = entity.getStorageLocation();
        this.remark = entity.getRemark();
        this.photoList = entity.getPhotoList();
        this.summaryFlag = entity.getSummaryFlag();
        this.summaryNumber = entity.getSummaryNumber();
        this.createTime = entity.getCreateTime();
        this.createUserId = entity.getCreateUserId();
        this.createUser = entity.getCreateUser();
        this.editorTime = entity.getEditorTime();
        this.editorUserId = entity.getEditorUserId();
        this.editorUser = entity.getEditorUser();
        this.printTime = entity.getPrintTime();
        this.printUserId = entity.getPrintUserId();
        this.printUser = entity.getPrintUser();
        this.pictureUrl = entity.getPictureUrl();
        this.reviewState = entity.getReviewState();
        this.directoryFlag = entity.getDirectoryFlag();
        this.supplierFlag = entity.getSupplierFlag();
        this.productCode = entity.getProductCode();
        this.serviceEndDate = entity.getServiceEndDate();
        this.categoryName = entity.getCategoryName();
        this.checkState = entity.getCheckState();
        this.checkUser = entity.getCheckUser();
        this.checkTime = entity.getCheckTime();
        this.isPrint = entity.getIsPrint();

    }

    @Override
    public AssetsInfo convertToEntity(){
        return new AssetsInfo(this);
    }


    @ApiModelProperty(value = "资产ID")
    private String assetsId;

    @ApiModelProperty(value = "资产编码(打印用,格式：LT[hsptcode]_xxxxxx),自动生成")
    private String assetsCode;

    @ApiModelProperty(value = "目录ID，手工录入时自动生成")
    private String dirId;

    @ApiModelProperty(value = "资产名称")
    private String assetsName;

    @ApiModelProperty(value = "资产类别")
    private String categoryId;

    @ApiModelProperty(value = "标签材质(0无标签 1普通RFID 2抗金属RFID，仅为0时可勾选summary_flag)")
    private Integer lableType;

    @ApiModelProperty(value = "资产状态(正常,遗失,标签破损,维修,报废,违规异动)")
    private String assetsState;

    @ApiModelProperty(value = "品牌")
    private String brand;

    @ApiModelProperty(value = "规格型号")
    private String specification;

    @ApiModelProperty(value = "计量单位")
    private String unit;

    @ApiModelProperty(value = "购买日期(yyyy-MM-dd)")
    private String buyDate;

    @ApiModelProperty(value = "折旧年限(月)")
    private Integer serviceLife;

    @ApiModelProperty(value = "到期日期(yyyy-MM-dd)")
    private String expireDate;

    @ApiModelProperty(value = "资产原值(购买价格)")
    private BigDecimal price;

    @ApiModelProperty(value = "资产净值")
    private BigDecimal nowPrice;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    private String supplier;

    @ApiModelProperty(value = "生产厂家编码")
    private String factoryCode;

    @ApiModelProperty(value = "生产厂家名称")
    private String factory;

    @ApiModelProperty(value = "使用部门ID")
    private String useDeptId;

    @ApiModelProperty(value = "使用部门")
    private String useDept;

    @ApiModelProperty(value = "使用人ID")
    private String useUserId;

    @ApiModelProperty(value = "使用人")
    private String useUser;

    @ApiModelProperty(value = "所在区域ID")
    private String areaId;

    @ApiModelProperty(value = "所在区域名称")
    private String areaName;

    @ApiModelProperty(value = "归属部门ID")
    private String belongDeptId;

    @ApiModelProperty(value = "归属部门")
    private String belognDept;

    @ApiModelProperty(value = "管理员ID")
    private String manageUserId;

    @ApiModelProperty(value = "管理员")
    private String manageUser;

    @ApiModelProperty(value = "存放地点")
    private String storageLocation;

    @ApiModelProperty(value = "备注说明")
    private String remark;

    @ApiModelProperty(value = "照片列表，sys_uploads表ID集合")
    private String photoList;

    @ApiModelProperty(value = "是否汇总数量(0 否，1 是，默认0)")
    private Integer summaryFlag;

    @ApiModelProperty(value = "汇总数量值(默认1)")
    private Integer summaryNumber;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人ID")
    private String createUserId;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "最后编辑时间")
    private Date editorTime;

    @ApiModelProperty(value = "最后编辑人ID")
    private String editorUserId;

    @ApiModelProperty(value = "最后编辑人")
    private String editorUser;

    @ApiModelProperty(value = "最后打印时间")
    private Date printTime;

    @ApiModelProperty(value = "最后打印人ID")
    private String printUserId;

    @ApiModelProperty(value = "最后打印人")
    private String printUser;

    @ApiModelProperty(value = "审核状态 0待审核 1已审核")
    private Integer reviewState;

    @ApiModelProperty(value = "产品码")
    private String productCode;

    @ApiModelProperty(value = " 维保到期日期(yyyy-MM-dd) ")
    private String serviceEndDate;
    
    @ApiModelProperty(value = "图片路径")
    @TableField(exist = false)
    private List pictureUrl;

    @ApiModelProperty(value = "物资是否存在资产目录表，1已存在")
    @TableField(exist = false)
    private Integer directoryFlag;

    @ApiModelProperty(value = "供应商是否存在供应商及厂家目录表，1已存在")
    @TableField(exist = false)
    private Integer supplierFlag;

    @ApiModelProperty(value = "资产类别名称")
    @TableField(exist = false)
    private String categoryName;

    @ApiModelProperty(value = "盘点状态")
    @TableField(exist = false)
    private Integer checkState;

    @ApiModelProperty(value = "盘点人")
    @TableField(exist = false)
    private String checkUser;

    @ApiModelProperty(value = "盘点时间")
    @TableField(exist = false)
    private String checkTime;

    @ApiModelProperty(value = "是否打印")
    @TableField(exist = false)
    private Integer isPrint;

}
